import React from 'react';
import logo from '../assets/logo.svg';
import "../assets/index.css"

class News extends React.Component {
    constructor(props) {
        super(props);

        this.state = {
            msg: "新闻",
            imgWidth: "img",
            list:['11111', '2222222', '33333'],
            litt2:[<h2>h2h2h</h2>, <h1>h1h1</h1>]
        } 
    }

    render() {

        var listResult = this.state.list.map(function(value, key) {
            return <li>{value}</li>
        })


        return(
            <div>
                {this.state.msg}
                <img src={logo}/>
                <img src={require("../assets/logo.svg")}/>
                <img className= {this.state.imgWidth} src="http://g.hiphotos.baidu.com/image/pic/item/5243fbf2b211931376d158d568380cd790238dc1.jpg"/>
                <hr/>
                <ul>
                    <li>This is a test</li>
                    <li>This is a test</li>
                    <li>This is a test</li>
                    <li>This is a test</li>
                </ul>
            </div>

        )
    }
}

export default News